//
//  ViewController.m
//  16-CycleImage
//
//  Created by dllo on 16/8/4.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "ViewController.h"
#import "CycleView.h"
@interface ViewController ()<CycleViewDelegate>
@property (weak, nonatomic) IBOutlet CycleView *cycleImages;


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    CycleView *cycleView = [[CycleView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 200)];
//    [self.view addSubview:cycleView];
    NSMutableArray *array = [NSMutableArray array];
    for (int i = 0; i < 5; i++) {
        [array addObject:[NSString stringWithFormat:@"%d.jpg", i]];
    }
    _cycleImages.delegate = self;
    NSString *first = [array firstObject];
    NSString *last = [array lastObject];
    [array insertObject:last atIndex:0];
    [array addObject:first];
    _cycleImages.arr = array;
    

}
- (void)didClickItemIndexpath:(NSIndexPath *)indexpath{
    NSLog(@"点击了图片%@", indexpath);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
